﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity.Framework;

namespace Business.Operations
{
    public class DevreOperation
    {
        private static HPDMASEntities db = new HPDMASEntities();

        public DevreOperation()
        {

        }

        public static Devre DevreGetByDevreId(int devreId)
        {
            var devre = (from c in db.Devre where c.DevreID == devreId select c).First();
            return devre;
        }

        public static List<Devre> DevreGetAll()
        {
            var devreListesi = db.Devre.ToList();
            return devreListesi;
        }

        public static void DevreInsert(Devre devre)
        {
            db.Devre.AddObject(devre);
            db.SaveChanges();
        }
    }


}
